package com.hxht.cmp.mapper;

import com.hxht.cmp.entity.Trial;
import com.hxht.cmp.pojo.SearchCriteria;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface TrialMapper extends Mapper<Trial> {


    /**
     * 区域法院开庭时长
     *
     * @param courtUidList
     * @return
     */
    int getCountOpenCourtTime(@Param("courtUidList") List<String> courtUidList);

    /**
     * 法官开庭时长
     *
     * @param param
     * @return
     */
    List<Map<String, Object>> selectListJudgeOpenTime(Map<String, String> param);

    /**
     * 区域开庭准点统计
     *
     * @param startDate
     * @param endDate
     * @return
     */
    List<Map<String, Object>> getOnTimeCountForArea(@Param("startDate") String startDate, @Param("endDate") String endDate);

    /**
     * 单个法院准点统计
     *
     * @param courtUid
     * @param startDate
     * @param endDate
     * @return
     */
    List<Map<String, Object>> getOnTimeCountForSingle(@Param("courtUid") String courtUid, @Param("startDate") String startDate, @Param("endDate") String endDate);

    /**
     * 准点统计跳转页面分页
     *
     * @param searchCriteria
     * @param min
     * @param max
     * @param order
     * @return
     */
    List<Map<String, Object>> selectOnTimeByConditions(@Param("param") SearchCriteria searchCriteria, @Param("min") Integer min, @Param("max") Integer max, @Param("order") String order);

    /**
     * 准点统计跳转页面分页总数查询
     *
     * @param searchCriteria
     * @param min
     * @param max
     * @return
     */
    int countOnTimeByConditions(@Param("param") SearchCriteria searchCriteria, @Param("min") Integer min, @Param("max") Integer max);

}